<?php

/**
 * @Author: Eden
 * @Date:   2019-07-10 17:20:12
 * @Last Modified by:   Eden
 * @Last Modified time: 2019-07-10 17:21:58
 */
namespace App\Transformers;

use App\Models\Smarty;
use League\Fractal\TransformerAbstract;

class SmartyTransformer extends TransformerAbstract
{
	public function transform(Smarty $smarty)
	{
		return [
			'id' => $smarty->id,
			'name' => $smarty->name,
			'funtion' => $smarty->funtion,
			'action_time' => $smarty->action_time,
			'action_num' => $smarty->action_num,
			'min' => $smarty->min,
			'info' => $smarty->info,
			'design_time' => $smarty->design_time,
			'created_at' => $smarty->created_at->toDateTimeString(),
			'updated_at' => $smarty->updated_at->toDateTimeString(),
		];
	}

}